package se.liu.oschi129.game.objects.items;

import se.liu.oschi129.animation.animationspace.AnimationSpace;
import se.liu.oschi129.game.objects.ObjectPlayer;
import se.liu.oschi129.world.model.World;

/**
 * This is player powerup
 */
public class ObjectPowerupMushroom extends ObjectPowerup implements CollectibleObject {
	
	public ObjectPowerupMushroom(double x, double y) {
		super(AnimationSpace.get("img_powerup01"), x, y, 16, 16);
	}
	
	@Override public void performPickupAction(World world, ObjectPlayer player) {
		world.setPoints(world.getPoints() + 100);
		if (player.getState() < 1)
			player.setState(1);
		world.removeObjectSynchronized(this);
	}
	
}
